package entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Mr.Q on 2018/4/23.
 * 描述
 */

public class UserJoinCommodity {

    /**
     * code : 000000
     * msg : 操作成功
     * data : [{"id":5,"title":"小米充电宝","imagePath":"sfasdfa","remark":"年轻人第一台笔记本","startTime":"2018-04-12T15:00:00.000+0000","endTime":"2018-04-12T15:30:00.000+0000","startPrice":100,"auctionGradient":50,"nowPrice":650,"userId":1},{"id":5,"title":"小米充电宝","imagePath":"sfasdfa","remark":"年轻人第一台笔记本","startTime":"2018-04-12T15:00:00.000+0000","endTime":"2018-04-12T15:30:00.000+0000","startPrice":100,"auctionGradient":50,"nowPrice":650,"userId":1},{"id":5,"title":"小米充电宝","imagePath":"sfasdfa","remark":"年轻人第一台笔记本","startTime":"2018-04-12T15:00:00.000+0000","endTime":"2018-04-12T15:30:00.000+0000","startPrice":100,"auctionGradient":50,"nowPrice":650,"userId":1}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable{
        /**
         * id : 5
         * title : 小米充电宝
         * imagePath : sfasdfa
         * remark : 年轻人第一台笔记本
         * startTime : 2018-04-12T15:00:00.000+0000
         * endTime : 2018-04-12T15:30:00.000+0000
         * startPrice : 100
         * auctionGradient : 50
         * nowPrice : 650
         * userId : 1
         */

        private int id;
        private String title;
        private String imagePath;
        private String remark;
        private String startTime;
        private String endTime;
        private int startPrice;
        private int auctionGradient;
        private int nowPrice;
        private int userId;

        protected DataBean(Parcel in) {
            id = in.readInt();
            title = in.readString();
            imagePath = in.readString();
            remark = in.readString();
            startTime = in.readString();
            endTime = in.readString();
            startPrice = in.readInt();
            auctionGradient = in.readInt();
            nowPrice = in.readInt();
            userId = in.readInt();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getImagePath() {
            return imagePath;
        }

        public void setImagePath(String imagePath) {
            this.imagePath = imagePath;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public String getStartTime() {
            return startTime;
        }

        public void setStartTime(String startTime) {
            this.startTime = startTime;
        }

        public String getEndTime() {
            return endTime;
        }

        public void setEndTime(String endTime) {
            this.endTime = endTime;
        }

        public int getStartPrice() {
            return startPrice;
        }

        public void setStartPrice(int startPrice) {
            this.startPrice = startPrice;
        }

        public int getAuctionGradient() {
            return auctionGradient;
        }

        public void setAuctionGradient(int auctionGradient) {
            this.auctionGradient = auctionGradient;
        }

        public int getNowPrice() {
            return nowPrice;
        }

        public void setNowPrice(int nowPrice) {
            this.nowPrice = nowPrice;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(id);
            dest.writeString(title);
            dest.writeString(imagePath);
            dest.writeString(remark);
            dest.writeString(startTime);
            dest.writeString(endTime);
            dest.writeInt(startPrice);
            dest.writeInt(auctionGradient);
            dest.writeInt(nowPrice);
            dest.writeInt(userId);
        }
    }
}
